FROM openjdk:17.0
LABEL authors="Rabit"
# 挂载目录
VOLUME /home/vh
# 创建目录
RUN mkdir -p /home/vh
# 安装vim 
RUN apt-get update && apt-get install -y vim && apt-get clean
# 设置环境变量
ENV JAVA_OPTS="-Xms256m -Xmx512m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m"
# 指定路径
WORKDIR /home/vh
# 复制jar文件到路径
#COPY ./jar/ruoyi-vue-service.jar /home/vh/ruoyi-modules-system.jar
EXPOSE 8080
# 启动系统服务
ENTRYPOINT ["java","-jar","ruoyi-vue-service.jar"]